home *** CD-ROM | disk | FTP | other *** search
- // CDemo1DlgView.cp -- view class
- // Created 01/01/95 12:01 PM by AppMaker
-
-
- #include "stdafx.h"
- #include "Demo1Dlg.h"
- #include "CDemo1DlgDoc.h"
- #include "CDemo1DlgView.h"
- #include "CTestDialog1.h"
- #include "CTestDialog2.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- //
- // class CDemo1DlgView
- //
-
- IMPLEMENT_DYNCREATE(CDemo1DlgView, CView)
-
- BEGIN_MESSAGE_MAP(CDemo1DlgView, CView)
- //{{AFX_MSG_MAP(CDemo1DlgView)
- ON_COMMAND(IDM_TestDialog1,OnTestDialog1)
- ON_COMMAND(IDM_TestDialog2,OnTestDialog2)
- //}}AFX_MSG_MAP
-
- // Use inherited for File/Print and File/Print Preview
- ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
- END_MESSAGE_MAP()
-
- //
- // CDemo1DlgView constructor
- //
-
- CDemo1DlgView::CDemo1DlgView()
- {
- }
-
- //
- // CDemo1DlgView destructor
- //
-
- CDemo1DlgView::~CDemo1DlgView()
- {
- }
-
- void CDemo1DlgView::OnDraw(CDC *pDC)
- {
- CDemo1DlgDoc *pDoc = GetDocument();
- }
-
- BOOL CDemo1DlgView::OnPreparePrinting(CPrintInfo *pInfo)
- {
- return DoPreparePrinting(pInfo);
- }
-
- void CDemo1DlgView::OnBeginPrinting(CDC */*pDC*/, CPrintInfo */*pInfo*/)
- {
- }
-
- void CDemo1DlgView::OnEndPrinting(CDC */*pDC*/, CPrintInfo */*pInfo*/)
- {
- }
-
- //
- // CDemo1DlgView debug diagnostics
- //
-
- #ifdef _DEBUG
- void CDemo1DlgView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CDemo1DlgView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CDemo1DlgDoc *CDemo1DlgView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDemo1DlgDoc)));
- return (CDemo1DlgDoc *) m_pDocument;
- }
-
- #endif
-
- //
- // CDemo1DlgView message handlers
- //
-
- //----------
- void
- CDemo1DlgView::OnTestDialog1 ()
- {
- CTestDialog1 theDlg;
- theDlg.DoModal(); // just showing, don't care about return
- }
-
- //----------
- void
- CDemo1DlgView::OnTestDialog2 ()
- {
- CTestDialog2 theDlg;
- theDlg.DoModal(); // just showing, don't care about return
- }
-
-